package com.terracloud.server.dao.sql.role;

import com.terracloud.server.dao.model.sql.UserRoleEntity;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.UUID;

/**
 *
 * @author chenhainan
 * @since 2025/10/21
 */
public interface UserRoleRepository extends JpaRepository<UserRoleEntity, UUID> {

    UserRoleEntity findByUserId(UUID userId);

    Long countByRoleId(UUID roleId);

    void deleteByUserId(UUID userId);
}
